repo.or.cz
/
and.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
floor(0.29 * 100) == 28
[and.git]
/
10815 - Andy's first dictionary
/
10815.cpp
blob
bdf6229832cb2413901c1c3ed36e1c62428d666f
1
#include <iostream>
2
#include <string>
3
#include <set>
4
#include <vector>
5
#include <sstream>
6
using namespace
std
;
7
8
typedef
set
<
string
>
words
;
9
10
int
main
(){
11
words w
;
12
string s
;
13
while
(
getline
(
cin
,
s
)){
14
for
(
int
i
=
0
;
i
<
s
.
size
(); ++
i
){
15
s
[
i
] =
tolower
(
s
[
i
]);
16
if
(!
isalpha
(
s
[
i
]))
s
[
i
] =
' '
;
17
}
18
stringstream
ss
(
s
);
19
while
(
ss
>>
s
){
20
w
.
insert
(
s
);
21
}
22
}
23
for
(
words
::
iterator i
=
w
.
begin
();
i
!=
w
.
end
(); ++
i
){
24
cout
<< (*
i
) <<
endl
;
25
}
26
return
0
;
27
}